package com.sky.mapper;

import com.sky.entity.Orders;
import com.sky.vo.OrderDetailVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserOrderMapper {

    void insertOrders(Orders orders);

    void updateOrders(Orders orders);

    @Select("select * from orders where id = #{id}")
    Orders selectOrdersById(Long id);

    @Select("select * from orders where id = #{id}")
    Orders selectById(Long id);

    List<OrderDetailVO> selectByStatus(Integer status, Long userId);

    void updateOrdersByNumber(Orders orders);

    @Select("select * from orders where number = #{number}")
    Orders selectByNumber(String number);
}
